package com.zhou.spring.test_002;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zhouyanxiang
 * @create 2020-07-2020/7/13-18:02
 */
public class SpringTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext2.xml");


        A a = ctx.getBean("A",A.class);
        System.out.println(" a.getName(): " + a.getName());
        B b = ctx.getBean("B",B.class);
        System.out.println(" b.getName(): " + b.getName());

    }
}
